import Vue from 'vue'
import Vuex from 'vuex'
import axios from 'axios'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    ar:[]
  },
  mutations: {
    get(state,data){
      state.ar = data
    }
  },
  actions: { 
    async get ({commit}){
        let res = await axios.get('nav.json')
          // console.log(res.data.result)
          this.ar = res.data.result
          // console.log(this.ar);
          return this.ar
    }
  },
  modules: {
  }
})
